﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiAbstractClipBoundary : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiAbstractClipBoundary(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiAbstractClipBoundary obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiAbstractClipBoundary()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiAbstractClipBoundary(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGiAbstractClipBoundary() : this(GlobalsPINVOKE.new_OdGiAbstractClipBoundary(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGiAbstractClipBoundary.BoundaryType type()
		{
			OdGiAbstractClipBoundary.BoundaryType result = (OdGiAbstractClipBoundary.BoundaryType)GlobalsPINVOKE.OdGiAbstractClipBoundary_type(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiAbstractClipBoundary clone()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiAbstractClipBoundary_clone(this.swigCPtr);
			OdGiAbstractClipBoundary result = (intPtr == IntPtr.Zero) ? null : new OdGiAbstractClipBoundary(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public enum BoundaryType
		{
			kNormal,
			kInverted,
			kExtended
		}
	}
}
